On the Complexity of Pattern Matching for Highly Compressed Two-Dimensional Texts
نویسندگان
چکیده
We consider the complexity of problems related to 2-dimensional texts (2d-texts) described succinctly. In a succinct description, larger rectangular sub-texts are deened in terms of smaller parts in a way similar to that of Lempel-Ziv compression for 1-dimensional texts, or in shortly described strings as in 9], or in hierarchical graphs described by context-free graph grammars. A given 2d-text T with many internal repetitions can have a hierarchical description (denoted Compress(T)) which is up to exponentially smaller and which can be the only part of the input for a pattern-matching algorithm which gives information about T. Such a hierarchical description is given in terms of a straight-line program, see 9] or, equivalently, a 2-dimensional grammar. We consider compressed pattern-matching, where the input consists of a 2d-pattern P and of a hierarchical description of a 2d-text T , and fully compressed pattern-matching, where the input consists of hierarchical descriptions of both the pattern P and the text T. For 1-dimensional strings there exist polynomial-time deterministic algorithms for these problems, for similar types of succinct text descriptions 2, 6, 8, 9]. We show that the complexity dramatically increases in a 2-dimensional setting. For example, compressed 2d-matching is NP-complete, fully compressed 2d-matching is P 2-complete, and testing a given occurrence of a two dimensional compressed pattern is co-NP-complete. On the other hand, we give eecient algorithms for the related problems of randomized equality testing and testing for a given occurrence of an uncompressed pattern. We also show the surprising fact that the compressed size of a subrectangle of a compressed two dimensional array can grow exponentially, unlike the one dimensional case.
منابع مشابه
The Complexity of Two - DimensionalCompressed Pattern -
We consider the complexity of problems for highly compressed 2-dimensional texts: compressed pattern-matching (when the pattern is not compressed and the text is compressed) and fully compressed pattern-matching (when also the pattern is compressed). First we consider 2-dimensional compression in terms of straight-line programs, see 9]. It is a natural way for representing very highly compresse...
متن کاملThe Complexity of Two-dimensional Compressed Pattern Matching
We study computational complexity of two-dimensional compressed pattern matching problems. Among other things, we design an eecient randomized algorithm for the equality problem of two compressed two-dimensional patterns as well as prove computational hardness of the general two-dimensional compressed pattern matching .
متن کاملPattern - Matching Problems for
The power of weighted nite automata to describe very complex images was widely studied, see [5, 6, 7]. Finite automata can be also used as an e ective tool for compression of twodimensional images. There are some software packages using this type of compression, see [12, 6]. We consider the complexity of some pattern-matching problems for two-dimensional images which are highly compressed using...
متن کاملFaster Subsequence and Don't-Care Pattern Matching on Compressed Texts
Subsequence pattern matching problems on compressed text were first considered by Cégielski et al. (Window Subsequence Problems for Compressed Texts, Proc. CSR 2006, LNCS 3967, pp. 127–136), where the principal problem is: given a string T represented as a straight line program (SLP) T of size n, a string P of size m, compute the number of minimal subsequence occurrences of P in T . We present ...
متن کاملLiteral Shuffle of Compressed Words
Straight-Line Programs (SLP) are widely used compressed representations of words. In this work we study the rational transformations and the literal shuffle of words compressed via SLP, proving that the first preserves the compression rate, while the second does not. As a consequence, we prove a tight bound for the descriptional complexity of 2D texts compressed via SLP. Finally, we observe tha...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1997